<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Admin</title>
<script type="text/javascript" src="static/js/my.js"></script>
<script type="text/javascript" src="static/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="static/js/asynreq.js"></script>
<style>
table,td {
	border: 1px solid black;
	width: 100%;
	table-layout: fixed;
	padding: 5px;
}

td {
	border: 1px solid black;
}
</style>
</head>
<body>
	<ul>
		<li><a href="index.html">html</a></li>
		<li><a href="about.html">about</a></li>
		<li><a href="blog.html">blog</a></li>
		<li><a href="life.html">life</a></li>
		<li><a href="contact.html">contact</a></li>
	</ul>
<br>
				
					<form action='pictureupload' method='POST'  enctype="multipart/form-data">
	Upload Avator<input type='file' value='upload' name='picture'/>
	<input type='hidden' name='reqkind' value='1'>
	<input type='submit' value='Upload'></input>
	</form>
				
				
				
				
				
				Avatar:<img src='/exhibitpicture?reqkind=4&user_key={{user_key}}'>
	<br>
	<h2>Blog:</h2>
	<div id="blogs">
		{% for blog in blogs %}
		<div id={{blog.key}}_blog_id>
			<div>key:{{blog.key}}</div>
			<div>user:{{blog.user.username}}</div>
			<div>title:{{blog.title}}</div>
			<div>catelog:{{blog.catelog}}</div>
			<div class=>text:{{blog.text}}</div>
			<div>picture:{{blog.picture}}</div>
			<div>time:{{blog.time}}</div>
			<form action="deleteblog" method="POST" id="{{blog.key}}">
				<input type="hidden" name="title" value="{{blog.title}}" />
				<input type="hidden" name="catelog" value="{{blog.catelog}}" />
				<input type="hidden" name="key" value="{{blog.key}}" />
			</form>
		</div>
		<input type="button" value="edit" onclick="update_blog('{{blog.key}}_blog_id')">
		<input type="button" value="delete" onclick="delete_blog('{{blog.key}}')">
		<br> ------------------------------------------------ {%endfor%} <br>
		<input type="button" value="add" onclick="new_blog('new_blog')">
		<div id="new_blog"></div>
	</div>
	<br>
	=======================================================================================================
	<h2>Contact:</h2>
	<div id="contact">
		{%for contact in contacts%}name:{{contact.name}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email:&nbsp;{{contact.email}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;microblog:http://{{contact.mircroblog}}<br>comments:{{contact.comments}}<br>time:{{contact.time}}
		<br>
		-------------------------------------------------
		<br>
		{%endfor%}
	</div>
	<br>
	=======================================================================================================
	<h2>Life:</h2>
	<br>
	<div id='life'>
			<form action='pictureupload' method='POST'  enctype="multipart/form-data">
	<input type='file' value='upload' name='picture'/>
	<textarea name='comment'></textarea>
	<input type='submit' value='Upload'></input>
	</form>
		
		{%for life in lifes%}
			<img  src="/exhibitpicture?reqkind=1&life.uuid={{life.key}}" title="下一张" alt="">
			{{life.time}}
			{{life.comment}}
			<form action='/lifedeleter' method='GET'>
			<input type='submit' value='delete'/>
			<input type='hidden' name='uuid' value='{{life.key}}'>
			</form>
				<form action="exhibitpicture?" method="POST">
				
				<select name="blog_key">
				{% for blog in blogs %} 
								<option value="{{blog.key}}">{{blog.catelog}}__{{blog.title}}</option>
			 {%endfor%}
			 </select>
			 <input type="hidden" name="life_key" value="{{life.key}}" />
			 <input type="hidden" name="reqkind" value="3" />
			<input type="submit" value="apply2blog">
		</form>
			
		{%endfor%}
		</div>
	<br>
	=======================================================================================================
	<h2>Comment:</h2>
	<br>
	<table id="comment">
		<tr>
			<td>ffffff</td>
			<td>123</td>
			<td>2123</td>
			<td>hhhhh</td>
		</tr>
	</table>
	<br>
	=======================================================================================================
	<h2>About:</h2>
	<br>
	<table id="about">
		<tr>
			<td>ffffff</td>
			<td>123</td>
			<td>fswww</td>
		</tr>
	</table>
</body>
</html>
